home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 368 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.4 KB

  1. From: Ulrich Kuehn <kuehn@GOEDEL.UNI-MUENSTER.DE>
  2. Subject: Re: Bug in GCC 2.4.5 PL 1 with MiNTLibs PL 30 
  3. Date: Thu, 15 Jul 93 15:04:59 +0200
  4.  
  5.  
  6. Markus Gutschke <srb242@math.uni-muenster.de> writes:
  7. >I am not quite sure if this is the appropriate place to report a bug
  8. >in GCC and/or the MiNT-Libs, but I hope somebody will be able to fix
  9. >it.
  10. >
  11. >I am running GCC 2.4.5 Patchlevel 1
  12. >with MintLibs Patchlevel 30
  13. >
  14. >When compiling the following code (with -O2)
  15. >
  16. >                int *a;
  17. >                
  18. >                static void _test(int b,void *c)
  19. >                {
  20. >                   long stack;
  21. >                   
  22. >                   stack = Super(0);
  23. >                   test(a,b,c);
  24. >                   Super((void *)stack);
  25. >                   return;
  26. >                }
  27. >
  28. >GCC will not remove the parameters "a,b,c" from the stack until it
  29. >returned from calling Super. Thus, the parameters will be pushed in
  30. >supervisormode and removed in user mode!
  31.  
  32. I dont see that this is a bug, since the stack after the first Super()
  33. call is in fact the user stack (!), so the pushing of the parameters
  34. will take place in supervisor mode, but on the user stack.
  35. When returning from the second Super() call, the user stack pointer is
  36. again itself, and the args are removed from it.
  37.  
  38. This behavior to pile up stack arguments is one thing to speed things
  39. up a bit, as the remove operations are done only after a number of calls
  40. and not after every call.
  41.  
  42. Regards,
  43. Ulrich
  44.